<template>
  <div class="">
    <my-list :list="dataList">
        <!-- v-slot 具名插槽使用的是 v-slot 不在是 slot 简写形式 #-->
      <template #default="{i,val}">
          <button @click="del(i,val)">删除</button>
      </template>
    </my-list>
  </div>
</template>
<script setup>
import myList from '../components/myList';
import { ref } from 'vue';
const dataList = ref(['他日若遂凌云志','敢笑黄巢不丈夫']);
const del = (val,val1) => {
   console.log(val);
   console.log(val1);
}
</script>
<style lang="scss" scoped>
</style>